<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript" src="<c:url value='/js/jquery/jquery.numeric.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/jquery/jquery.formatCurrency-1.4.0.pack.js'/>"></script>
<script src="<c:url value='/js/jquery/jqueryFileTree/jqueryFileTree.js' />" type="text/javascript"></script>
<script src="<c:url value='/js/file-browser.js' />" type="text/javascript"></script>
<link href="<c:url value='/js/jquery/jqueryFileTree/jqueryFileTree.css' />" rel="stylesheet" type="text/css" />
<link href="<c:url value='/css/dhtmlxcombo_paylineitem.css' />"	rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$('#pageTitle').text('<spring:message code="editCipeprojectDetail.heading" />');

						$.validator.addMethod("partner_drop_down_required", function(value, element) {
							var projecttype = $("#cipeprojecttype.id option:selected").text();
							if(projecttype=="Management"/*value=30*/ || projecttype=="Partner"/*value=32*/) {
								return (value != "");
							}
							return true;
						}, "Please select an option.");

						$.validator.addMethod("endDateValidation", function(value, element) {
							var date_ini = new Date($('#projectStartDate').val()).getTime();
							var date_end = new Date($('#projectEndDate').val()).getTime();
							if (isNaN(date_ini)) {
								//if required we will add code
							} else if (isNaN(date_end)) {
								//if required we will add code
							} else if (date_ini > date_end) {
								return false;

							}
							return true;
						},  "Project End Date must be greater than the Project Start Date."
						);

						$.validator.addMethod("startDateValidation", function(value, element) {
							var date_ini = new Date($('#projectStartDate').val()).getTime();
							var date_end = new Date($('#projectEndDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini > date_end) {
								return false;

							}
							return true;
						},  "Project Start Date must be less than the Project End Date."
						);

						$.validator.addMethod("overrideValidation", function(value, element) {
							if ($('input[name="override"]').prop('checked') && ($("#overrideAmount").val() == "" || $("#overridePeriodStartDate").val() == "" || $("#overridePeriodEndDate").val() == "")) {
								return false;
							}
							return true;
						},  "You must enter Budget Override Amount, Budget Override Period Start and End Dates."
						);

						$.validator.addMethod("overridePeriodEndDateValidation", function(value, element) {
							var date_ini = new Date($('#overridePeriodStartDate').val()).getTime();
							var date_end = new Date($('#overridePeriodEndDate').val()).getTime();
							if (isNaN(date_ini)) {
								//if required we will add code
							} else if (isNaN(date_end)) {
								//if required we will add code
							} else if (date_ini > date_end) {
								return false;

							}
							return true;
						},  "Budget Override Period End Date must be greater than the Budget Override Period Start Date."
						);

						$.validator.addMethod("overridePeriodStartDateValidation", function(value, element) {
							var date_ini = new Date($('#overridePeriodStartDate').val()).getTime();
							var date_end = new Date($('#overridePeriodEndDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini > date_end) {
								return false;

							}
							return true;
						},  "Budget Override Period Start Date must be less than the Budget Override Period End Date."
						);
						
						$.validator.addMethod("startDateValidateDonorAward",function(value,element){
						  	var date_ini = new Date($('#projectStartDate').val()).getTime();
							var date_end = new Date($('#donorStartDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini < date_end) {
								return false;
							}
							return true;
						 },
						  "Project Start Date must be greater than or equal to the Donor Award Start Date."
						 );

						$.validator.addMethod("endDateValidateDonorAward",function(value,element){
						  	var date_ini = new Date($('#projectEndDate').val()).getTime();
							var date_end = new Date($('#donorEndDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini > date_end) {
								return false;
							}
							return true;
						 },
						  "Project End Date must be less than or equal to Donor Award End Date."
						 );
						
						$.validator.addMethod("startDateDonorEndDateValidateDonorAward",function(value,element){
						  	var date_ini = new Date($('#projectStartDate').val()).getTime();
							var date_end = new Date($('#donorEndDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini > date_end) {
								return false;
							}
							return true;
						 },
						  "Project Start Date must be less than or equal to the Donor Award End Date."
						 );

						$.validator.addMethod("endDateDonorStartDateValidateDonorAward",function(value,element){
						  	var date_ini = new Date($('#projectEndDate').val()).getTime();
							var date_end = new Date($('#donorStartDate').val()).getTime();
							if (isNaN(date_ini)) {
							} else if (isNaN(date_end)) {
							} else if (date_ini < date_end) {
								return false;
							}
							return true;
						 },
						  "Project End Date must be greater than or equal to the Donor Award Start Date."
						 );
						 
						$("#editCipeprojectForm").validate({
							rules : {
								'partner.id' : {
									//required : true
									partner_drop_down_required: true
								},
								acronym : {
									required : true
								},
								costCenterNumber : {
									required : true
								},
								projectTitle : {
									required : true
								},
								'donoraward.id' : {
									required : true
								},
								projectStartDate : {
									required : true,
									startDateValidation : true,
									startDateValidateDonorAward : true,
									startDateDonorEndDateValidateDonorAward : true
								},
								projectEndDate : {
									required : true,
									endDateValidation : true,
									endDateValidateDonorAward : true,
									endDateDonorStartDateValidateDonorAward : true
								},
								overrideAmount : {
									required : false,
									overrideValidation : true
								},
								overridePeriodStartDate : {
									required : false,
									overrideValidation : true,
									overridePeriodStartDateValidation : true
								},
								overridePeriodEndDate : {
									required : false,
									overrideValidation : true,
									overridePeriodEndDateValidation : true
								},
								'cipeprojecttype.id' : {
									required : true
								},
								'cipeprojectstatus.id' : {
									required : true
								},
								'region.id' : {
									required : true
								},
								'country.id' : {
									required : true
								},
								'seniorProgramOfficer.id' : {
									required : true
								},
								'programOfficer.id' : {
									required : true
								},
								'programAssistant.id' : {
									required : true
								},
								managementFunds : {
									required : true
								}
							}

						});

						$("#regions").bind("change", function() {
							loadDataViaAjax("loadCountries.do", {
								"regionId" : this.value
							}, parseCountriesJson);
						});

						$("#countries")
								.bind(
										"change",
										function() {
											loadDataViaAjax(
													"loadCountryUsers.do",
													{
														"countryId" : this.value
													},
													function(result) {
														$("#programOfficer").get(0).value = result.programOfficer ? result.programOfficer
																: "";
														$("#programAssistant").get(0).value = result.programAssistant ? result.programAssistant
																: "";
													});
										});

					//	$("#regions").trigger("change");
	  
						$('#cipeprojecttype\\.id').change(function() {
							var projecttype = $("#cipeprojecttype\\.id option:selected").text();
							var donorAwardId = $("#donorawardId option:selected").val();
							if(projecttype=="Select" || projecttype=="" || projecttype==null) {
								loadDataViaAjax("getActiveDonoraward.do", donorAwardId != "" ? {
									"donorawardId" : donorAwardId
								} : {}, parseDonorAwardJson);
							}else if(projecttype=="Balance Sheet"/*value=35*/){
								loadDataViaAjax("getActiveDonorawardOnlyBalanceSheet.do", donorAwardId != "" ? {
									"donorawardId" : donorAwardId
								} : {}, parseDonorAwardJson);				

							} else {
								loadDataViaAjax("getActiveDonorawardNoBalanceSheet.do", donorAwardId != "" ? {
									"donorawardId" : donorAwardId
								} : {}, parseDonorAwardJson);
							}

							changePartnerDropDownRequired();
	  					});

	  					function changePartnerDropDownRequired() {
	  						var projecttype = $("#cipeprojecttype\\.id option:selected").text();

	  						//var classNameReq = 'input-full-width-req text_blue';
	  						//var classNameNotReq = 'input-full-width text_white';
	  						if(projecttype=="Management"/*value=30*/ || projecttype=="Partner"/*value=32*/) {
	  							$('.dhx_combo_box ').eq(0).css("background-color", "#d6e5f4");
	  							$('.dhx_combo_input').eq(0).css("background-color", "#d6e5f4");
		  						//$('#partner').removeClass(classNameNotReq).addClass(classNameReq);
		  					} else {
	  							$('.dhx_combo_box ').eq(0).css("background-color", "#ffffff");
	  							$('.dhx_combo_input').eq(0).css("background-color", "#ffffff");
		  						//$('#partner').removeClass(classNameReq).addClass(classNameNotReq);
		  					}
		  				}

	  					changePartnerDropDownRequired();

						$('#donorawardId').change(function() {
							loadDataViaAjax("getDonorAwardBean.do", {
								"donorawardId" : this.value
							}, function(bean) {
								if(bean != null) {
    								$('#donorName').val((bean.donorName) ? bean.donorName : '');
    								$('#donorStartDate').val((bean.formattedStartDate) ? bean.formattedStartDate : '');
    								$('#donorEndDate').val(bean.formattedEndDate ? bean.formattedEndDate : '');
								}
							});
						});
						$('#donorawardId').change();

						$("#projectStartDate").bind("change", getFiscalYear);//.trigger("change");
						<c:if test="${empty cipeproject.fiscalYear}">
						$("#projectStartDate").change();
						</c:if>

						$('#view-knowledgemanagement').click(function() {
							loadDiv('content', 'showEditKnowledgeManagement.do?id=' + $(this).attr('cipeprojectId'));
						});

						$('#mail-to-trigger')
								.click(
										function() {
											window.location = 'mailto:grantsmanagement@cipe.org?Subject=Data%20Discrepency%20Found%20-%20Project%20#%20' + $(this).attr('cipeprojectId');
										});
						$('#view-modifications').click(function() {
							loadDiv('content', 'showCipeprojectModifications.do?id=' + $(this).attr('cipeprojectId'));
						});
						$('#view-rollup').click(function() {
							var proId=$(this).attr('cipeprojectId');
							if(proId==null ||proId==''){
								 alert("This Project is not Rollup with any other Project.");
								 return false;
							}else{
								loadDiv('content', 'showCipeprojectSummary.do?id='
										+ proId);
								return true;
							}
						});
						$('#view-loggedpayments').click(function() {
							loadDiv('content', 'showCipeprojectPaymentRequestLineItems.do?id=' + $(this).attr('cipeprojectId'));
						});
						$('.view-cipeprojectdetail-link').click(function() {
							loadDiv('content', 'showEditCipeprojectDetail.do?id=' + $(this).attr('cipeprojectId'));
						});
						$('.view-cipeprojectsummary-link').click(function() {
							loadDiv('content', 'showCipeprojectSummary.do?id=' + $(this).attr('cipeprojectId'));
						});
						$('.add-reporting-link').click(function() {
							loadDiv('content', 'showAddReportingrequirements.do');
						});

						$("#projectStartDate").datepicker();
						$("#projectEndDate").datepicker();

						$("#overridePeriodStartDate").datepicker();
						$("#overridePeriodEndDate").datepicker();

						$('#add-partner').click(function() {
							loadDiv('content', 'showAddPartner.do?fromProjectDetail=true&fromProjectDetailId=' + $(this).attr('cipeprojectId'));
						});

						$('.close-button').click(function() {
							//if (confirm('Are you sure you want to close the form?')) {
								window.location = '../secure/showDashboard.do';
							//}
						});

						$('#editButton').click(function() {
							enabledControls();
							//loadDiv('content', 'showEditCipeprojectDetail.do?editable=true&id=' + $(this).attr('cipeprojectId'));
						});

						$('#cancelButton')
								.click(
										function() {
											var ans = confirm('Are you sure you want to cancel editing this record without saving it?');
											if (ans) {
												//disabledControls();
												loadDiv('content', 'showEditCipeprojectDetail.do?id=' + $(this).attr('cipeprojectId'));
											}
										});

						$('.edit-partnergrant-link').click(function() {
							loadDiv('content', 'showEditPartnergrantView.do?id=' + $(this).attr('partnergrantId'));
						});

						function showSubstitute(show, subId, tobeSubId) {
							if(show) {
								$('#' + subId).css('display', 'block');
								$('#' + tobeSubId).css('display', 'none');
							} else {
								$('#' + subId).css('display', 'none');
								$('#' + tobeSubId).css('display', 'block');
								$('#' + tobeSubId).focus();
							}
						}
						
						$('#programAssistant').bind("focusout",function(){		
						   $('#managementFundsLabel').click();
						});
						
						$('#managementFunds').numeric();

						$('#managementFunds').formatCurrency('#managementFundsLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
						showSubstitute(true, 'managementFundsLabel','managementFunds');

						$('#managementFunds').blur(function(){
							$('#managementFunds').formatCurrency('#managementFundsLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
							showSubstitute(true, 'managementFundsLabel','managementFunds');
						});

						$('#managementFundsLabel').click(function(){
							showSubstitute(false, 'managementFundsLabel','managementFunds');
						});

						$('#managementFundsLabel').focus(function() {
							$('#managementFundsLabel').css('display', 'none');
							$('#managementFunds').css('display', 'block');
							$('#managementFunds').focus();
						});
						
						$('#partnerGrantFunds').numeric();

						$('#partnerGrantFunds').formatCurrency('#partnerGrantFundsLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
						showSubstitute(true, 'partnerGrantFundsLabel','partnerGrantFunds');

						$('#partnerGrantFunds').blur(function(){
							$('#partnerGrantFunds').formatCurrency('#partnerGrantFundsLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
							showSubstitute(true, 'partnerGrantFundsLabel','partnerGrantFunds');
						});

						$('#partnerGrantFundsLabel').click(function(){
							showSubstitute(false, 'partnerGrantFundsLabel','partnerGrantFunds');
						});

						$('#partnerGrantFundsLabel').focus(function() {
							$('#partnerGrantFundsLabel').css('display', 'none');
							$('#partnerGrantFunds').css('display', 'block');
							$('#partnerGrantFunds').focus();
						});
						
						$('#overrideAmount').numeric();

						$('#overrideAmount').formatCurrency('#overrideAmountLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
						showSubstitute(true, 'overrideAmountLabel','overrideAmount');

						$('#overrideAmount').blur(function(){
							$('#overrideAmount').formatCurrency('#overrideAmountLabel',{colorize: true, negativeFormat: '-%s%n', roundToDecimalPlace: 2});
							showSubstitute(true, 'overrideAmountLabel','overrideAmount');
						});

						$('#overrideAmountLabel').click(function(){
							showSubstitute(false, 'overrideAmountLabel','overrideAmount');
						});

						$('#overrideAmountLabel').focus(function() {
							$('#overrideAmountLabel').css('display', 'none');
							$('#overrideAmount').css('display', 'block');
							$('#overrideAmount').focus();
						});

						$("#costCenterNumber").bind("change", function() {
							$('#projectID').val(this.value);
						});
						
						sortDropDownListByText();

						disabledControls();
						
						<c:if test="${!empty cipeproject.id && cipeproject.id > 0}">
    				    	var modificationLocationBrowser = new FileBrowser('S:\\Scanned Documents','<c:url value="/js/jquery/jqueryFileTree/connectors/jqueryFileTree.jsp" />', 
    				    			function(file) {
    				    				$('#modificationDocumentLocation').val(file);
    				    			},
    				    			function(dir) {
    				    			},
    				    			function() {
    				    				$('#doSave').click();
    				    				// OK Listener
    				    			},
    				    			function() {
    				    				$('#doSave').click();
    				    				// OK Listener
    				    			}
    				    	);
    				    	modificationLocationBrowser.setTitle('Select modification document file');
    				    	
    				    	$('#save').click(function() {
    				    		var prevStartDate = '${cipeproject.prevStartDate}';
    				    		var prevEndDate = '${cipeproject.prevEndDate}';
    				    		var prevManagementFunds = ${cipeproject.prevManagementFunds};
    				    		var prevStatus = '';
    				    		<c:if test="${!empty cipeproject.prevStatusId}">
    				    		prevStatus = '${cipeproject.prevStatusId}';
    				    		</c:if>
    				    		
    				    		var currStartDate = $('#projectStartDate').val();
    				    		var currEndDate = $('#projectEndDate').val();
    				    		var managementFunds = $('#managementFunds').val();
    				    		if('' == $.trim(managementFunds)) {
    				    			managementFunds = 0;
    				    		}
    				    		var currStatus = $('#cipeprojectstatus').val();
    				    		
    				    		if(prevStartDate != currStartDate 
    				    			|| prevEndDate != currEndDate
    				    			|| prevManagementFunds != managementFunds
    				    			|| prevStatus != currStatus) {
    				    			modificationLocationBrowser.open();
    				    		} else {
    				    			$('#doSave').click();
    				    		}
    				    	});
    
    				    	$('.attachmentPath').click(function() {
    							var fileName = $('div', this).text();
    							window.open("<c:url value='/openFile.do' />?fileName=" + fileName, "_blank", "left=20, top=20, width=700, height=700, toolbar=1, resizable=0").focus();
    						});
    				    </c:if>
	});
	
	function enableDisabledControls() {
		<c:if test="${cipeproject.id !=null and cipeproject.id gt 0}">
		 <c:choose>
		  <c:when test="${cipeproject.id !=null and cipeproject.id gt 0}">
			$("form :input")/*.removeAttr*/.prop("disabled",/*"disabled"*/false);
			$("#donorName").attr("readonly","readonly");
			$("#donorStartDate").attr("readonly","readonly");
			$("#donorEndDate").attr("readonly","readonly");

			$("#projectID").attr("readonly","readonly");
			$("#createdBy").attr("disabled","disabled");
			$("#creationDate").attr("readonly","readonly");
			$("#updatedBy").attr("disabled","disabled");
			$("#updationDate").attr("readonly","readonly");
			$("#save").removeAttr("disabled","disabled");
			$("#cancelButton").removeAttr("disabled","disabled");
			$("#editButton").attr("disabled","disabled");
		  </c:when>
		  <c:otherwise>
			$("form :input").attr("disabled","disabled");
			$("input[type^='button']").removeAttr("disabled","disabled");
			$("input[type^='submit']").removeAttr("disabled","disabled");
			$("#save").attr("disabled","disabled");
			$("#cancelButton").attr("disabled","disabled");
			$("#editButton").removeAttr("disabled","disabled");
		  </c:otherwise>
		 </c:choose>
		</c:if>
		
	}

	function enabledControls() {
		<c:if test="${cipeproject.id !=null and cipeproject.id gt 0}">
			z1.readonly(false,true);
			$("form :input")/*.removeAttr*/.prop("disabled",/*"disabled"*/false);
			$("form :input")/*.removeAttr*/.prop("readonly",/*"readonly"*/false);
			$("#projectStartDate").datepicker();
			$("#projectEndDate").datepicker();
			$("#overridePeriodStartDate").datepicker();
			$("#overridePeriodEndDate").datepicker();
			$("#donorName").attr("readonly","readonly");
			$("#donorStartDate").attr("readonly","readonly");
			$("#donorEndDate").attr("readonly","readonly");
			$("#projectID").attr("readonly","readonly");
			$("#createdBy").attr("disabled","disabled");
			$("#creationDate").attr("readonly","readonly");
			$("#updatedBy").attr("disabled","disabled");
			$("#updationDate").attr("readonly","readonly");
			$("#save").removeAttr("disabled","disabled");
			$("#cancelButton").removeAttr("disabled","disabled");
			$("#editButton").attr("disabled","disabled");
		</c:if>
	}

	function disabledControls() {
		<c:if test="${cipeproject.id !=null and cipeproject.id gt 0}">
			z1.readonly(true,false);
			$("form :input").attr("readonly","readonly");
			var selects = $('#editCipeprojectForm select');
			selects.each(function() {
				$(this).attr("disabled","disabled");
			});
			$("#projectStartDate").datepicker( "destroy" );
			$("#projectEndDate").datepicker( "destroy" );
			$("#overridePeriodStartDate").datepicker( "destroy" );
			$("#overridePeriodEndDate").datepicker( "destroy" );
			$("input[type^='button']").removeAttr("disabled","disabled");
			$("input[type^='submit']").removeAttr("disabled","disabled");
			$("#save").attr("disabled","disabled");
			$("#cancelButton").attr("disabled","disabled");
			$("#editButton").removeAttr("disabled","disabled");
		</c:if>
	}
	
	function getFiscalYear() {
		var str1 = document.getElementById("projectStartDate").value;
		var mon1 = parseInt(str1.substring(0, 2), 10);
		var dt1 = parseInt(str1.substring(3, 5), 10);
		var yr1 = parseInt(str1.substring(6, 10), 10);
		var dt2 = 1;
		var mon2 = 10;

		var date1 = new Date(yr1, mon1, dt1);
		var date2 = new Date(yr1, mon2, dt2);

		if (isNaN(yr1)) {
			//do nothing
		} else {

			if (date1 >= date2) {
				document.getElementById("fiscalYear").value = yr1 + 1;
			} else {
				document.getElementById("fiscalYear").value = parseInt(yr1);
			}
		}
	}

	function parseCountriesJson(data) {
		var html = "<option value=''>Select</option>";
		var directorId = "";
		if (data) {
			for (p in data) {
				if (p != 'director') {
					html += "<option value='" + p + "'>" + data[p] + "</option>";
				} else {
					directorId = data[p];
				}
			}
		}
		$("#countries option").remove();
		$("#countries").append(html).trigger("change");
		$("#seniorProgramOfficer").get(0).value = directorId;
		sortDropDownListByText();
	}

	function parseDonorAwardJson(data) {
		var html = "<option value=''>Select</option>";
		var found = false;
		var donorAwardId = $("#donorawardId option:selected").val();
		if (data) {
			for (p in data) {
					html += "<option value='" + data[p] + "'>" + p + "</option>";
					if (!found && data[p] == donorAwardId) {
						found = true;
					}
				}
		}
		$("#donorawardId option").remove();
		$("#donorawardId").append(html);
		if (found) $("#donorawardId").val(donorAwardId);
		$("#donorawardId").trigger("change");
		sortDropDownListByText();
	}

	function sortDropDownListByText(obj) {
		// Loop for each select element on the page.

		$("select").each(function() {

			// Keep track of the selected option.
			var selectedValue = $(this).val();
			// Sort all the options by text.
			$(this).html($("option", $(this)).sort(function(a, b) {
				return a.text == b.text ? 0 : ((a.text < b.text) || (a.value == '')) ? -1 : 1;
				// return a.text == $(selectId + 'option:first').text ? -1 : a.text < b.text ? -1 : 1;
			}));

			// Select one option.
			$(this).val(selectedValue);
		});
	}
	
	var z1 = dhtmlXComboFromSelect("partner",274/*316*/);
	z1.enableFilteringMode(true);

	
</script>
<div id="editCipeprojectDiv">
	<form:form name="editCipeprojectForm" id="editCipeprojectForm" action="saveCipeprojectDetail.do" method="post" modelAttribute="cipeproject">
		<div id="dialogContainer"></div>
		<form:hidden path="id" />
        <form:hidden path="modificationDocumentLocation"/>
		<div class="main_form">
			<div class="form_head">
				<div class="floatL" style="padding-top: 5px;">
					<a href="#" class="blue_btn" id="view-loggedpayments" cipeprojectId="${cipeproject.id}"> <spring:message code="editCipeprojectSummary.link.payments" /></a>
                    <a href="#" class="blue_btn" id="view-knowledgemanagement" cipeprojectId="${cipeproject.id}"> <spring:message code="editCipeprojectSummary.link.knowledgemanagement" /></a>
                    <c:if test="${isGrantUser || isStaffUser || isKmUser || isSrManagementUser || isAdminUser }">
                      <a href="#" class="blue_btn" id="view-modifications" cipeprojectId="${cipeproject.id}"> <spring:message code="editCipeprojectSummary.link.modifications" /></a>
                    </c:if>
                    <a href="#" class="blue_btn" id="view-rollup" cipeprojectId="${cipeproject.masterProject.id}"> <spring:message code="editCipeprojectSummary.link.rollup" /></a>
                    <a href="#" class="blue_btn" id="mail-to-trigger" cipeprojectId="${cipeproject.projectID}"> <spring:message code="editCipeprojectSummary.link.notify" /></a>
				</div>
				<a href="#" class="close-button gray_btn floatR">Close Form</a><br class="clear" />
			</div>
			<div class="form_cont">
				<table cellspacing="10" width="100%">
					<!-- 
					<tr class="row">
						<td class="menu-heading" colspan="3"><spring:message code="editCipeprojectDetail.heading" /></td>
					</tr>
					 -->
					<tr class="row">
						<td class="input-field" colspan="5"><%@ include file="/common/messages.jsp"%></td>
					</tr>
					<tr>
						<td style="vertical-align: top;">
							<table>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.type" /></td>
									<td class="input-field"><form:select path="cipeprojecttype.id" cssClass="input-full-width-req text_blue" tabindex="1">
											<form:option value="" label="Select" />
											<form:options items="${cipeprojecttypeList}" itemValue="id" itemLabel="displayName" />
										</form:select> <form:errors path="cipeprojecttype.id" cssClass="error" /></td>
								</tr>
								
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.costCenter" /></td>
									<td class="input-field"><form:input path="costCenterNumber" id="costCenterNumber" maxlength="50" cssClass="input-full-width-req text_blue" tabindex="2" /> <form:errors path="costCenterNumber" cssClass="error" /></td>
								</tr>
								
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.projectID" /></td>
									<td class="input-field"><form:input path="projectID" maxlength="50" cssClass="input-full-width text_grey" tabindex="3" /> <form:errors path="projectID" cssClass="error" /></td>
								</tr>

								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.partner" /></td>
									<td class="input-field" nowrap="nowrap">
										<span style="width: 278px; float: left;">
										<form:select id="partner" path="partner.id" cssClass="input-full-width-req text_blue" tabindex="4">
											<form:option value="" label="" />
											<form:options items="${partnerList}" itemValue="id" itemLabel="partnerName" />
										</form:select>
										</span>
										<input type="button" id="add-partner" class="blue_btn" value="<spring:message code="link.add" />" cipeprojectId="${cipeproject.id}" tabindex="5" /> <form:errors path="partner.id" cssClass="error" /></td>
								</tr>

								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.donorAwardID" /></td>
									<td class="input-field" nowrap="nowrap"><form:select id="donorawardId" path="donoraward.id" cssClass="input-full-width-req text_blue" tabindex="6">
											<form:option value="" label="Select" />
											<form:options items="${donorawardList}" itemValue="id" itemLabel="donorAwardNumber" />
										</form:select> <input type="button" class="blue_btn" id="edit-donoraward" value="<spring:message code="link.view" />" tabindex="7" /> <form:errors path="donoraward.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.donorName" /></td>
									<td class="input-field"><form:input path="" readonly="true" cssClass="input-full-width text_grey" id="donorName" tabindex="8" /> <form:errors path="" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.donorStartDate" /></td>
									<td class="input-field"><form:input path="" readonly="true" cssClass="input-full-width text_grey" id="donorStartDate" tabindex="9" /> <form:errors path="" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.donorEndDate" /></td>
									<td class="input-field"><form:input path="" readonly="true" cssClass="input-full-width text_grey" id="donorEndDate" tabindex="10" /> <form:errors path="" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.startDate" /></td>
									<td class="input-field"><form:input path="projectStartDate" cssClass="input-full-width-req text_blue" onchange="getFiscalYear()" /> <form:errors path="projectStartDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.endDate" /></td>
									<td class="input-field"><form:input path="projectEndDate" cssClass="input-full-width-req text_blue" tabindex="12" /> <form:errors path="projectEndDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.acronym" /></td>
									<td class="input-field"><form:input path="acronym" maxlength="50" cssClass="input-full-width-req text_blue" tabindex="13" /> <form:errors path="acronym" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.projectTitle" /></td>
									<td class="input-field"><form:input path="projectTitle" maxlength="100" cssClass="input-full-width-req text_blue" tabindex="14" /> <form:errors path="projectTitle" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.region" /></td>
									<td class="input-field"><form:select path="region.id" cssClass="input-full-width-req text_blue" id="regions" tabindex="15">
											<form:option value="" label="Select" />
											<form:options items="${regionList}" itemValue="id" itemLabel="displayName" />
										</form:select> <form:errors path="region.id" cssClass="error" /></td>
									<td><form:errors path="region.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.country" /></td>
									<td class="input-field"><form:select path="country.id" id="countries" cssClass="input-full-width-req text_blue" tabindex="16">
											<form:option value="" label="Select" />
											<form:options items="${countryList}" itemValue="id" itemLabel="displayName" />
										</form:select> <form:errors path="country.id" cssClass="error" /></td>
									<td><form:errors path="country.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.status" /></td>
									<td class="input-field"><form:select id="cipeprojectstatus" path="cipeprojectstatus.id" cssClass="input-full-width-req text_blue" tabindex="17">
											<form:options items="${cipeprojectstatusList}" itemValue="id" itemLabel="displayName" />
										</form:select> <form:errors path="cipeprojecttype.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.nedIdentifier" /></td>
									<td class="input-field"><form:input path="nedIdentifier" maxlength="50" cssClass="input-full-width text_white" tabindex="22" /> <form:errors path="nedIdentifier" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="input-field" align="center" colspan="2">
										<%--
							<c:choose>
								<c:when test="${cipeproject.id !=null and cipeproject.id gt 0}">
								   <c:choose>
								      <c:when test="${param.editable!='true'}">
									    <input class="blue_btn" id="editButton" type="button" value="Edit" cipeprojectId="${cipeproject.id}"/>
								      </c:when>
								      <c:otherwise>	
									      <input class="blue_btn" id="cancelButton" type="reset" value="<spring:message code='button.cancel' />" />
									      <sj:submit cssClass="blue_btn" id="loginFormSubmit" target="editCipeprojectDiv" key="editCipeproject.button.save" validate="true" />
								      </c:otherwise>
								   </c:choose>  	
								</c:when>
								<c:otherwise>
								 <input class="blue_btn" id="editButton" type="button" value="Edit" cipeprojectId="${cipeproject.id}"/>
									<input class="blue_btn" id="cancelButton" type="reset" value="<spring:message code='button.cancel' />" />
									<sj:submit cssClass="blue_btn" id="loginFormSubmit" target="editCipeprojectDiv" key="editCipeproject.button.save" validate="true" />
								</c:otherwise>
							</c:choose>
							 --%> 
								  <c:if test="${not empty allowedUiElements['Project - Detailed View']['EDIT button']}">                                  
	                                   <input class="blue_btn" id="editButton" type="button" value="Edit" cipeprojectId="${cipeproject.id}" tabindex="34" /> 
	                                   <input class="blue_btn" id="cancelButton" type="button" value="<spring:message code='button.cancelEdit' />"
										cipeprojectId="${cipeproject.id}" tabindex="35" />
								  </c:if>
                                <c:choose>
                                    <c:when test="${!empty cipeproject.id && cipeproject.id > 0}">
                                      <input id="save" type="button" class="blue_btn" value='<spring:message code="editCipeproject.button.save" />'>
                                      <sj:submit id="doSave" cssClass="hiddenSubmitButton" target="editCipeprojectDiv" key="editCipeproject.button.save" validate="true" tabindex="-1" />
                                    </c:when>
                                    <c:otherwise>
                                      <sj:submit id="doSave" cssClass="blue_btn" target="editCipeprojectDiv" key="editCipeproject.button.save" validate="true" tabindex="-1" />
                                    </c:otherwise>
                                </c:choose>
									</td>
								</tr>
							</table>
						</td>
						<td style="vertical-align: top;">
							<table>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.seniorProgramOfficer" /></td>
									<td class="input-field"><form:select id="seniorProgramOfficer" path="seniorProgramOfficer.id" cssClass="input-full-width-req text_blue" tabindex="18">
											<form:option value="" label="Select" />
											<form:options items="${seniorProgramOfficerList}" itemValue="id" itemLabel="fullName" />
										</form:select> <form:errors path="seniorProgramOfficer.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.programOfficer" /></td>
									<td class="input-field"><form:select id="programOfficer" path="programOfficer.id" cssClass="input-full-width-req text_blue" tabindex="19">
											<form:option value="" label="Select" />
											<form:options items="${programOfficerList}" itemValue="id" itemLabel="fullName" />
										</form:select> <form:errors path="programOfficer.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.programAssistant" /></td>
									<td class="input-field"><form:select id="programAssistant" path="programAssistant.id" cssClass="input-full-width-req text_blue" tabindex="20">
											<form:option value="" label="Select" />
											<form:options items="${programAssistantList}" itemValue="id" itemLabel="fullName" />
										</form:select> <form:errors path="programAssistant.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.managementFunds" /></td>
									<td class="input-field"><form:input path="managementFunds" cssClass="input-full-width-req text_blue" tabindex="21" />	
									<input type="text" value="&nbsp;" readonly="readonly"  id="managementFundsLabel" class="uneditable input-sub input-full-width-req text_blue" tabindex="21"/> 
									<form:errors path="managementFunds" cssClass="error"/></td>
								</tr>
								<tr class="row">
								    <td class="label"><spring:message code="editCipeproject.label.partnerGrantFund" /></td>
									<td class="input-field"><form:input path="partnerGrantFunds" cssClass="input-full-width-req text_blue" tabindex="21" />	
									<input type="text" value="&nbsp;" readonly="readonly"  id="partnerGrantFundsLabel" class="uneditable input-sub input-full-width-req text_blue" tabindex="21"/> 
									<form:errors path="partnerGrantFunds" cssClass="error"/></td>
									
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.rollupProject" /></td>
									<td class="input-field"><form:select path="masterProject.id" cssClass="text_white" tabindex="23">
											<form:option value="" label="Select" />
											<form:options items="${cipeprojectrollupList}" itemValue="id" itemLabel="projectTitle" />
										</form:select> <form:errors path="masterProject.id" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.fiscalYear" /></td>
									<td class="input-field"><form:input path="fiscalYear" cssClass="input-full-width text_blue" tabindex="24" /> <form:errors path="fiscalYear" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.memo" /></td>
									<td class="input-field"><form:input path="memo" maxlength="5000" cssClass="input-full-width text_white" tabindex="25" /> <form:errors path="memo" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.fileLocation" /></td>
									<td class="input-field"><form:input path="fileLocation" maxlength="512" cssClass="input-full-width text_white" tabindex="26" /> <form:errors path="fileLocation" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.approvedFileLocation" /></td>
									<td class="input-field"><form:input path="approvedFileLocation" maxlength="255" cssClass="input-full-width text_white" tabindex="27" /> <form:errors path="approvedFileLocation" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.blockTimeSheet" /></td>
									<td class="input-field"><form:checkbox path="blockTimeSheet" cssClass="input-full-width" value="true" tabindex="28" /> <form:errors path="blockTimeSheet" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.override" /></td>
									<td class="input-field"><form:checkbox path="override" cssClass="input-full-width" value="true" tabindex="29" /> <form:errors path="override" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.statusOverride" /></td>
									<td class="input-field"><form:checkbox path="statusoverride" cssClass="input-full-width" value="true" tabindex="29" /> <form:errors path="statusoverride" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.overrideAmount" /></td>
									<td class="input-field"><form:input path="overrideAmount" cssClass="input-full-width-req text_blue" tabindex="30" />	
									<input type="text" value="&nbsp;" readonly="readonly"  id="overrideAmountLabel" class="uneditable input-sub input-full-width-req text_blue" tabindex="30"/> 
									<form:errors path="overrideAmount" cssClass="error"/></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.overridePeriodStartDate" /></td>
									<td class="input-field"><form:input path="overridePeriodStartDate" cssClass="input-full-width-req text_blue" tabindex="31" /> <form:errors path="overridePeriodStartDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="editCipeproject.label.overridePeriodEndDate" /></td>
									<td class="input-field"><form:input path="overridePeriodEndDate" cssClass="input-full-width-req text_blue" tabindex="32" /> <form:errors path="overridePeriodEndDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="label.createdBy" /></td>
									<td class="input-field"><form:input readonly="true" path="createdBy.fullName" cssClass="input-full-width text_grey" tabindex="33" /> <form:errors path="createdBy" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="label.creationDate" /></td>
									<td class="input-field"><form:input readonly="true" path="creationDate" cssClass="input-full-width text_grey" tabindex="34" /> <form:errors path="creationDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="label.updatedBy" /></td>
									<td class="input-field"><form:input readonly="true" path="updatedBy.fullName" cssClass="input-full-width text_grey" tabindex="35" /> <form:errors path="updatedBy" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td class="label"><spring:message code="label.updationDate" /></td>
									<td class="input-field"><form:input readonly="true" path="updationDate" cssClass="input-full-width text_grey" tabindex="36" /> <form:errors path="updationDate" cssClass="error" /></td>
								</tr>
								<tr class="row">
									<td colspan="2">
										<table>
											<tr>
												<th></th>
												<th>Budget Amount</th>
												<th>Disbursed Amount</th>
												<th>Balance Amount</th>
											</tr>
											<tr>
												<td><b>Management Amnt:</b></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.projectBudgetAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.totalManagementSolomonDisbursedAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.projectBalanceAmount}" pattern="$#,##0.##;" /></td>
											</tr>
											<tr>
												<td><b>Partner Grant/s:</b></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.partnerBudgetAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.totalPartnerDisbursedAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.totalPartnerBalanceAmount}" pattern="$#,##0.##;" /></td>
											</tr>
											<tr>
												<td><b>Total:</b></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.projectPartnerBudgetAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.totalManagementSolomonPartnerDisbursedAmount}" pattern="$#,##0.##;" /></td>
												<td><fmt:formatNumber type="currency" value="${cipeproject.totalProjectPartnerBalanceAmount}" pattern="$#,##0.##;" /></td>
											</tr>
											<tr>
												<td><b>#Linked Sub-Grants:</b></td>
												<td>${fn:length(childCipeprojectList)}</td>
												<td></td>
												<td></td>
											</tr>											
										</table>									
										<table cellpadding="2" cellspacing="2" align="right">
			   					 			<tr>
												<td colspan="3" style="padding-left:100px"><b>Solomon Data</b></td>									
								 			</tr>
								 			<c:choose>
										 		<c:when test="${cipeproject.solomon.costcenternumber == null}">
													<tr><td style="padding-right:150px ">No Solomon data present for this Project ID !</td>							
													</tr>	
								
												</c:when>						
												<c:otherwise>
													<tr>										
														<td><b>Expenses as of</b></td>
														<td><b>Cost Center</b></td>
														<td><b>Description</b></td>
														<td><b>Amount</b></td>								
													</tr>
													<tr>
														<td><fmt:formatDate type="date" pattern="MM/dd/yyyy" value="${cipeproject.solomon.date}" /></td>
														<td>${cipeproject.solomon.costcenternumber}</td>									
														<td>Salary and Fringe as of <fmt:formatDate type="date" pattern="MM/dd/yyyy" value="${cipeproject.solomon.date}" /></td>
														<td><fmt:formatNumber type="currency" value="${cipeproject.solomon.totalAmount}" pattern="$#,##0.##;" /></td>							
													</tr>
													<tr></tr>
												</c:otherwise>
										 	</c:choose>				
										</table>
								  </td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<div>
					<spring:message code="editCipeprojectDetail.heading.grants" />
				</div>
				<div id="cipeprojectListDiv" class="hastable" style="overflow: auto">
					<table class="tablesorter">
						<thead>
							<tr>
								<th><spring:message code="partnergrantlist.table.heading.projectID" /></th>
								<th><spring:message code="partnergrantlist.table.heading.projectSponsor" /></th>
								<th><spring:message code="partnergrantlist.table.heading.acronym" /></th>
								<th><spring:message code="partnergrantlist.table.heading.budget" /></th>
								<th><spring:message code="partnergrantlist.table.heading.disbursed" /></th>
								<th><spring:message code="partnergrantlist.table.heading.balance" /></th>
								<th><spring:message code="partnergrantlist.table.heading.projectTitle" /></th>
								<th><spring:message code="partnergrantlist.table.heading.startDate" /></th>
								<th><spring:message code="partnergrantlist.table.heading.endDate" /></th>
								<th><spring:message code="partnergrantlist.table.heading.status" /></th>
								<th><spring:message code="partnergrantlist.table.heading.ingrants" /></th>
								<th><spring:message code="partnergrantlist.table.heading.agreement" /></th>
								<th><spring:message code="partnergrantlist.table.heading.autho" /></th>
								<th><spring:message code="partnergrantlist.table.heading.bank" /></th>
								<!-- <th><spring:message code="partnergrantlist.table.heading.type" /></th>
								<th><spring:message code="partnergrantlist.table.heading.programOfficer" /></th>
								<th><spring:message code="partnergrantlist.table.heading.region" /></th>
								<th><spring:message code="partnergrantlist.table.heading.country" /></th>
								<th><spring:message code="partnergrantlist.table.heading.managementFunds" /></th> -->
								<%--<th><spring:message code="partnergrantlist.table.heading.edit" /></th> --%>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${childCipeprojectList}" var="cipeproject">
								<tr>
									<td>${cipeproject.projectID}</td>
									<td><a href="javascript://" class="edit-partnergrant-link" partnergrantId="${cipeproject.id}">${cipeproject.acronym} <spring:message code="label.separator" /> ${cipeproject.partner.partnerName}
									</a></td>
									<td>${cipeproject.acronym}</td>
									<%--<td><a href="javascript://" class="edit-partnergrant-link" partnergrantId="${cipeproject.id}">${cipeproject.projectID}</a></td> --%>
									<td><spring:message code="label.dollar" />${cipeproject.partnerBudgetAmount}</td>
									<td><spring:message code="label.dollar" />${cipeproject.partnerDisbursedAmount}</td>
									<td><spring:message code="label.dollar" />${cipeproject.partnerBalanceAmount}</td>
									<td>${cipeproject.projectTitle}</td>
									<td><fmt:formatDate pattern="MM-dd-yyyy" value="${cipeproject.projectStartDate}" /></td>
									<td><fmt:formatDate pattern="MM-dd-yyyy" value="${cipeproject.projectEndDate}" /></td>
									<td>${cipeproject.cipeprojectstatus.displayName}</td>
									<td>${cipeproject.receivedingrantsforapproval}</td>
									<td>${cipeproject.receiptOfSignedAgreement}</td>
									<td>${cipeproject.receiptOfSignatureAuthorization}</td>
									<td>${cipeproject.receiptOfBankInformation}</td>
									<!--<td>${cipeproject.cipeprojecttype.displayName}</td>
									<td>${cipeproject.programOfficer.fullName}</td>
									<td>${cipeproject.region.displayName}</td>
									<td>${cipeproject.country.displayName}</td>
									<td>${cipeproject.managementFunds}</td>-->
									<%--<td><a href="javascript://" class="edit-partnergrant-link" partnergrantId="${cipeproject.id}"><spring:message code="partnergrantlist.table.link.edit" /></a></td> --%>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<div id="cipeprojectawardListPager"></div>
				</div>
				<br class="clear" /> <br class="clear" /> <br class="clear" />
              <c:if test="${isGrantUser || isStaffUser || isKmUser || isSrManagementUser || isAdminUser }">
				<div>Project Modification</div>
				<table class="tablesorter">
					<thead>
						<tr>
							<th>ID</th>
							<th>Modification Type</th>
							<th>Modified From</th>
							<th>Modified To</th>
							<th>Modified Date</th>
							<th>Modified By</th>
							<th>File Location of Modified Document</th>
						</tr>
					</thead>
					<tbody>
						<c:choose>
							<c:when test="${fn:length(cipeproject.cipeprojectmodifications) > 0}">
								<c:forEach items="${cipeproject.cipeprojectmodifications}" var="modification">
									<tr>
										<td>${modification.id}</td>
										<td>${modification.modificationType.modificationTypeDesc}</td>
										<td>${modification.modifiedFrom}</td>
										<td>${modification.modifiedTo}</td>
										<td>${modification.formattedModifiedDate}</td>
										<td>${modification.modifiedBy.fullName}</td>
										<td><a href="#" onclick="return false;" class="attachmentPath"><div>${modification.attachment}</div></a></td>
									</tr>
								</c:forEach>
							</c:when>
							<c:otherwise>
								<tr>
									<td colspan="7" style="padding-left: 10px;">No modifications found.</td>
								</tr>
							</c:otherwise>
						</c:choose>
					</tbody>
				</table>
              </c:if>
			</div>
		</div>
	</form:form>
</div>